// dlg.txt

//mark_quest_dest(zone,x,y,layer,quest);
//void cancel_out_fight(0,short kill_enc)
//void make_outdoor_enc(short x,short y,short which_enc)
//void set_out_fight_field(short which_field)

begintalkscript;

variables;

short this_sec = 85;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "You finally reach the outskirts of [F0]. This is a fortress of Haven, one of seven in the Rokaj. You are standing on actual Haven land now, given to your nation by treaty. Haven's vassal states always give up these patches of land for your fortresses.";
	text2 = "Unfortunately, you see little here to make you proud. [F0] has been neglected for years. The roads are torn up. The crops are failing. Some of the workshops inside have even been abandoned. So has the military camp to the east.";
	text3 = "You can see why Sutter sent you straight here. Now that you actually need battle support, there is a lot of work to do here.";
	code =
		sf(100 + this_sec,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "The farmlands of [F0] are tended to by this lone group of workers. Some are Ro. A few came from overseas. Your mother would be appalled to see her lands so neglected.";
	text2 = "They bow as you pass. There is a problem here, but it's not really your problem.";
	code =
		sf(100 + this_sec,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "The orchards of [F0], like every other part of it, have been miserably neglected. The wagons and baskets are falling apart. It has been many years since your family visited, and it shows.";
	code =
		sf(100 + this_sec,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "At first, you thought that this road was protected by your soldiers. It makes sense, since you are so close to [F0]. By the time you see their mismatched gear and brutal expressions, it's too late to get away.";

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "You pause long enough to heal and bandage the two warriors. Your skill saves them from their wounds. When they realize who you are, they receive your help with shocked silence.";
	text2 = "Eventually, you send them back north to [F0]. Your safe haven is visible just over the hill to the north.";
	code =
		award_party_xp(30);
	break;
	
begintalknode;
	tag = 15;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = (((gf(9,11) == 0) && (gf(185,10) == 0)) || ((gf(9,11) > 0) && (gf(185,11) == 0))) ;
	question = "Name";
	text1 = "You meet a small group of Havenite soldiers. They came here from overseas to help keep control of the Ro, and they are doing a bad job of it. Their equipment is outdated and poorly maintained, and they are in terrible shape. When they realize who you are, they are terrified.";
	text2 = "You calm them down and tell them to continue their patrol. There will be plenty of time to whip them into shape later.";
	text3 = "You meet a small group of Havenite soldiers. They came here from overseas to help keep control of the Ro, and they are working hard to become worthy of their position. They have been training, and they aren't out of breath when they meet you.";
	text4 = "They stand at attention as you walk by. Then they return to the hunt for northern raiders. More could come over the hill at any moment.";
	action = END_TALK;
	code =
		cancel_out_fight(0,0);
		cs();
		if ((gf(9,11) == 0) && (gf(185,10) == 0)) {
			sf(185,10,1);
			as(1); as(2);
			}
		if ((gf(9,11) > 0) && (gf(185,11) == 0)) {
			sf(185,11,1);
			as(3); as(4);
			}
	break;

	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "You arrive at this campsite just in time. Two of your soldiers have been trapped here, surrounded by ka-wolves and actual-wolves. Even if they were properly supplied and trained, they would be in serious trouble here. Haven soldiers can handle desperate odds, but there are limits.";
	code =
		set_out_fight_field(8);
	break;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Save them.";
	text1 = "You barge your way through the circle of foes, blocking them moments before they tear apart your soldiers.";
	text2 = "The two warriors are stunned into silence, but only for a moment. Then they show the proper mettle of Havenite warriors and ready their weapons.";
	action = END_TALK;
	
begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Slip away quietly.";
	text1 = "You quietly flee along the valley, trying to ignore the gruesome eating sounds coming from behind you. It is hard, but sometimes you need your soldiers to make sacrifices for the greater good.";
	action = END_TALK;
	code =
		cancel_out_fight(1,1);
	break;
	
	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				